home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Cl…ness) 1997 September #242 / Software of the Month Club - Business Shareware (September 1997).iso / dos / biz / bascal / plaise.doc next >
Encoding:
Text File  |  1996-08-03  |  20.6 KB  |  516 lines

  1.  
  2.               ┌███████ ┌███     ┌███████ ┌███ ┌███████ ┌███████
  3.               │███┐███ │███     │███┐███ │███ │███───┘ │███───┘
  4.               │███████ │███     │███████ │███ │███████ │███████
  5.               │███───┘ │███     │███┐███ │███ └───┐███ │███───┘
  6.               │███     │███████ │███│███ │███ ┌███████ │███████
  7.               └──┘     └──────┘ └──┘└──┘ └──┘ └──────┘ └──────┘
  8.  
  9.                                     BasCal
  10.                                  version 1.10
  11.  
  12.                               by Raphael Slepon
  13.  
  14.  
  15.  
  16. Those readers of a hasty nature, eager to plunge their paws into the Plaise
  17. program, will do better than to read the following compilation by using the
  18. program's online help (Translation: press F1).
  19.  
  20. Change history is recorded at the end of this file.
  21.  
  22.  
  23.  
  24. OVERVIEW
  25. ========
  26.  
  27. Plaise is a multi-base calculator with the following properties:
  28.  
  29.      a) base range: from 2 to 36 (all functions are supported for all bases)
  30.      b) supports whole (integer) numbers, fractional (floating-point) numbers,
  31.         and negative numbers
  32.      c) allowed range of numbers from -2147483647 to +2147483647 (base 10)
  33.      d) displays 11 digits after the decimal (basal) point
  34.      e) operations: addition, substraction, multiplication, division, power,
  35.         root, inversion, bitwise and, bitwise or, bitwise xor, bitwise not
  36.      e) three-line display (two operands and their result)
  37.      f) a plethora of potentially useless functions (Translation: I like lots
  38.         of options)
  39.      g) interactive full-screen text-based user interface
  40.      h) online help and intelligent (of sorts) error-trapping (Translation:
  41.         you don't lose the 42-digit number you laboriously typed in just
  42.         because you tried to divide it by zero; come to think of it, things
  43.         disappear only when you make them disappear, not at the program's
  44.         whim)
  45.      i) free for private use (Translation: there are other uses for which it
  46.         is not free)
  47.      j) development team is very attentive to users' requests (Translation:
  48.         I will seriously address and attempt to implement any option you may
  49.         wish to see in the program, however ridiculous)
  50.  
  51.  
  52.  
  53. INTRODUCTION
  54. ============
  55.  
  56. Plaise is a calculator, not unlike the simple calculator one is used to, and
  57. indeed it can be easily used as a fancy decimal calculator capable of doing
  58. sums, multiplications, square roots and the likes. Its distinction, however,
  59. lies in its ability to work in other bases (a.k.a. number systems) than the
  60. everyday decimal system.
  61.  
  62. For those unfamiliar with the term, different bases or number systems differ
  63. in the number of digits used to represent numbers. The decimal system (base
  64. 10) uses, surprisingly, 10 digits (0 through 9). Similarly, base 2 uses 2
  65. digits, 0 and 1, base 19 uses 19 digits (0 - 9 and A - I), &c. As you have
  66. noticed, bases larger than 10 use letters as digits, following the order of
  67. the alphabet. This is the reason Plaise is restricted to bases up to 36, which
  68. uses all the digits (0-9) and letters (A-Z) available.
  69.  
  70. Some bases are regularly used within restricted avenues of life, e.g. bases
  71. 2 and 16 are widely used in computer science, base 18 is often used in golf,
  72. base 7 in mining, and base 31 in North Sea whaling. Others have more
  73. widespread uses; an observant reader will readily discern the obvious
  74. relevance of the next equation to everyday life:
  75.  
  76. (JAMES.II in base 29) / (John.Doe in base 26) = (54.0346113006 in base 7)
  77.  
  78. Furthermore, with the advent of multi-base calculators such as this program,
  79. relatively unknown bases (base 34 comes to mind) may attain worldwide fame (or
  80. not).
  81.  
  82. For those narrow-minded enough to lack applications for a multi-base
  83. calculator, myself to name but one, it may serve as just a regular, yet very
  84. accurate, calculator.
  85.  
  86.  
  87.  
  88. STATUS
  89. ======
  90.  
  91. For private use this program is completely free and comes with no warranty
  92. whatsoever. Except for distributing this program within collections of other
  93. Shareware and Freeware programs, any business, commercial or government use
  94. requires the approval of the author, who currently wishes to maintain any
  95. copyright left in this program.
  96.  
  97. I intend to upgrade this program at irregular intervals, primarily dependent
  98. upon input from disgruntled users suddenly aware that the feature they need
  99. most just happens to be missing from the program.
  100.  
  101. Don't hesitate to contact me with any requests and bug reports, preferably by
  102. e-mail. I promise to promptly reply to any such communication, as well as to
  103. try and mend what wasn't broken anyway. By the way, all this talking about bug
  104. reports is purely spurious, as my programs don't have bugs!
  105.  
  106. My e-mail:    mrkgnao@actcom.co.il
  107.  
  108. My address:   Raphael Slepon
  109.               P.O.Box 15521
  110.               Rishon Lezion 75054
  111.               Israel
  112.  
  113.  
  114.  
  115. INSTALLATION
  116. ============
  117.  
  118. Absolutely none. The program will, without asking your permission and without
  119. notifying you in any way, irrevocably refrain from touching your CONFIG.SYS,
  120. AUTOEXEC.BAT, SYSTEM.INI, and WIN.INI files.
  121.  
  122. Hardware requirements: a computer and DOS would be nice; if you can spare it,
  123. you might want to add a keyboard and a monitor.
  124.  
  125. You may try to type PLAISE followed by enter at the command-line in order to
  126. activate the program.
  127.  
  128.  
  129.  
  130. SCREEN LAYOUT
  131. =============
  132.  
  133. The screen is composed of four parts:
  134.  
  135.     a) Title - top of screen; doesn't change much, although sightings of some
  136.                pretty darn bizarre effects have been reported, as yet
  137.                remaining unconfirmed
  138.  
  139.     b) Function Keys' Help - bottom of screen; a table filled with
  140.                              intentionally obscure abbreviations intended to
  141.                              confuse the user and help the function keys lead
  142.                              a less arduous life
  143.  
  144.     c) Message Line - the bottom row; try typing a letter to see one of the
  145.                       many annoying error messages you will undoubtably meet
  146.                       while working on the program
  147.  
  148.     d) Calculator Windows - a set of eight windows displaying:
  149.  
  150.                             ┌─────────────┐  ┌─────────────────────┐
  151.             ┌────────────┐  │ 1st operand │  │ base of 1st operand │
  152.             │  operator  │  └─────────────┘  └─────────────────────┘
  153.             └────────────┘  ┌─────────────┐  ┌─────────────────────┐
  154.             ┌────────────┐  │ 2nd operand │  │ base of 2nd operand │
  155.             │ equal sign │  └─────────────┘  └─────────────────────┘
  156.             └────────────┘  ┌─────────────┐  ┌─────────────────────┐
  157.                             │   result    │  │    base of result   │
  158.                             └─────────────┘  └─────────────────────┘
  159.  
  160.  
  161.  
  162. TERMINOLOGY
  163. ===========
  164.  
  165. This document contains some extremely complex terms in a pathetic attempt to
  166. give the reader the feeling she or he is reading a text of some relevance.
  167. These are explained below:
  168.  
  169.     Operand:  a fancy term for one of the two numbers involved in an
  170.               arithmetic calculation
  171.  
  172.     Operator: a fancier term for the type of calculation performed
  173.  
  174.     Result:   a fanciest term for the result
  175.  
  176. For example, in (8.4 / 4.0 = 2.1), 8.4 is the first operand, 4.0 the second
  177. operand, / the operator, and 2.1 the result. The term "equal sign" is too
  178. technical to be explained in this document.
  179.  
  180.     Line:     a pair of a number and its base
  181.  
  182.     Field:    one of the two parts of a number, namely the integer part (whole
  183.               numbers) situated to the left of the (decimal) point, and the
  184.               fraction part situated to its right; these two field will be
  185.               marked INTEG & FRACT in this document
  186.  
  187.     Digit:    one of the characters composing a number, whether actually a
  188.               digit (0-9) or a letter (a-z & A-Z)
  189.  
  190.     Mode:     one of the two editing states, namely Insert (inserts digit to
  191.               right in INTEG, to left in FRACT) and Overwrite (overwrites
  192.               digit, unless situated at the edges of the field); Insert mode
  193.               is characterized by a large block cursor, Overwrite by a small
  194.               underscore one
  195.  
  196. The program supports the following bitwise operations (these are most clear
  197. and useful in base 2 (binary)):
  198.  
  199.     And:      for each binary digit, result is 1 if both operands are 1,
  200.               otherwise result is 0
  201.  
  202.     Or:       for each binary digit, result is 1 if any operand is 1,
  203.               otherwise result is 0
  204.  
  205.     Xor:      for each binary digit, result is 1 if only one operand is 1,
  206.               otherwise result is 0
  207.  
  208.     Not:      for each binary digit, switches from 0 to 1 and vice versa
  209.  
  210.  
  211.  
  212. CURSOR MOVEMENT
  213. ===============
  214.  
  215. The following keys allow you to move within the calculator:
  216.  
  217. Left Arrow -   Move cursor one digit to the left
  218.                Exceptions: - at left edge of FRACT -  move cursor to INTEG
  219.                            - at left edge of INTEG -  move cursor one space to
  220.                                                       the left (to allow input
  221.                                                       before leftmost digit)
  222.  
  223. Right Arrow -  Move cursor one digit to the right
  224.                Exceptions: - at right edge of INTEG - see note below
  225.                            - at right edge of FRACT - move cursor one space to
  226.                                                       the right (to allow
  227.                                                       input after rightmost
  228.                                                       digit)
  229.                Notes: - By default, when the cursor is positioned at the right
  230.                         edge of INTEG, digits are inserted to the right;
  231.                         however, if you have moved the cursor to the left,
  232.                         upon returning to the rightmost INTEG digit (in
  233.                         overwrite mode) that digit will be overwritten and
  234.                         only then will input revert to normal; therefore, when
  235.                         at right edge of INTEG, the right arrow will have
  236.                         different results under different situations: a)
  237.                         cursor come from left - cursor doesn't move but next
  238.                         digit will be inserted to right rather than overwrite
  239.                         the rightmost digit; b) cursor come from left and
  240.                         already pressed once the right arrow - move cursor to
  241.                         FRACT; c) in all other situations - also move cursor
  242.                         to FRACT.
  243.                       - I am rather proud of this lovely piece of obscurity,
  244.                         bound to add long overdue confusion to an already
  245.                         muddled-up world.
  246.  
  247. Down Arrow -   Move cursor one line down
  248.  
  249. Up Arrow -     Move cursor one line up
  250.  
  251. Home -         Move cursor to left edge of field
  252.  
  253. End -          Move cursor to right edge of field
  254.                Exceptions: - in FRACT - move after rightmost digit
  255.  
  256. Point or Tab - Move cursor to other field
  257.  
  258.  
  259.  
  260. NUMBER EDITING
  261. ==============
  262.  
  263. Digits -       Insert or overwrite digit, dependent on mode
  264.                Notes: Allowed digits are dependent on the base of the current
  265.                       line
  266.  
  267. Ins -          Switch to other mode and change cursor size accordingly
  268.  
  269. Del -          Delete digit under cursor
  270.  
  271. Backspace -    Delete digit to left of cursor
  272.                Exceptions: - at left edge of field - delete digit under cursor
  273.  
  274. The nice program will not allow you to enter numbers too big (allowed range is
  275. ±2147483647 in base 10), use digits outside those allowed for the current
  276. base, divide by zero &c., all-in-all acting like a fascist gluteal orifice.
  277.  
  278.  
  279.  
  280. ARITHMETICAL AND BITWISE OPERATIONS
  281. ===================================
  282.  
  283. (The symbol ^Letter means ctrl-Letter (e.g. ^A means ctrl-A))
  284.  
  285. + or ^A     -  Add operands upon pressing '='; display '+' in operator window
  286.  
  287. - or ^S     -  Substract operand 2 from operand 1 upon pressing '='; display
  288.                '-' in operator window
  289.  
  290. * or ^M     -  Multiply operands upon pressing '='; display '*' in operator
  291.                window
  292.  
  293. / or ^D     -  Divide operand 1 by operand 2 upon pressing '='; display '÷' in
  294.                operator window
  295.  
  296. @ or ^P     -  Raise operand 1 to the power of operand 2 upon pressing '=';
  297.                display '' in operator window
  298.  
  299. $ or ^R     -  Extract the operand 2 root of operand 1 upon pressing '=';
  300.                display '√' in operator window; if you wonder why $, remember
  301.                that money is the root of all evil
  302.  
  303. & or ^B     -  Perform "bitwise and" on operands upon pressing '='; display
  304.                '&' in operator window
  305.  
  306. | or ^O     -  Perform "bitwise or" on operands upon pressing '='; display
  307.                '|' in operator window
  308.  
  309. ^ or ^X     -  Perform "bitwise xor" on operands upon pressing '='; display
  310.                '^' in operator window
  311.  
  312. space or ^N -  Copy operand 2 to the result upon pressing '='; display an
  313.                empty operator window; this allows user (i.e. the single person
  314.                still reading this document) to have 3 independent numbers
  315.                displayed on the screen, as well as to keep a number in the
  316.                result for later use; this operation is referred to as the
  317.                "null operation" for reasons unknown to the author
  318.  
  319. All the above operators also result in the cursor moving to the other operand
  320. (to allow simple input, in the form of 4 + 5 = )
  321.  
  322. = or Enter -   Carry out operation (note that there is no situation in which
  323.                operation is undefined; the default is the null operation);
  324.                display '=' in equal-sign window (unbelievable); result is
  325.                displayed in the result window (truly unbelievable); note that
  326.                you cannot edit the number in the result window; note that '='
  327.                is displayed for as long as the equation stands true, i.e.
  328.                until you change one of the operands or the operators, at which
  329.                time it will disappear, never to be seen or heard of again
  330.                (well, perhaps not never); note that this is the fifth note in
  331.                this paragraph
  332.  
  333. # or alt-1 -   Change current operand to its inverse (1/x) in the current
  334.                window
  335.  
  336. ~ or alt-0 -   Perform "bitwise not" on current operand in the current window
  337.  
  338. F6 -           Change current operand to its negative (-x), in the current
  339.                window (actually just adds or deletes a minus sign before the
  340.                number)
  341.  
  342.  
  343.  
  344. BASE CHANGING FUNCTION KEYS
  345. ===========================
  346.  
  347. Since different bases are the bread-and-butterfly (with my kindest apologies
  348. to Lewis Carroll) of this program, it has a very (with my kindest
  349. apologies to Mark Twain) nice (with may kindest apologies to most anybody)
  350. collection of function keys to deal with changing of bases:
  351.  
  352. F2 -           Change current line to binary mode (base 2)
  353.  
  354. shift-F2 -     Change all lines to binary mode (base 2)
  355.  
  356. F10 -          Change current line to decimal mode (base 10)
  357.  
  358. shift-F10 -    Change all lines to decimal mode (base 10)
  359.  
  360. F8 -           Change current line to hexadecimal mode (base 16)
  361.  
  362. shift-F8 -     Change all lines to hexadecimal mode (base 16)
  363.  
  364. F5 -           Change current line to any base you choose (base 2-36)
  365.  
  366. shift-F5 -     Change all lines to any one base you choose (base 2-36)
  367.  
  368. F7 -           Change current line to next base in the sequence 2-10-16; if
  369.                current base is not part of this sequence, change to base 10
  370.  
  371. shift-F7 -     Change all lines to next base in the sequence 2-10-16 (based on
  372.                the base of the current line); if current base is not part of
  373.                this sequence, change to base 10
  374.  
  375. ctrl-F7 -      Change current line to next base; if current base is 36, change
  376.                to base 2
  377.  
  378. shift-ctrl-F7- Change current line to previous base; if current base is 2,
  379.                change to base 36
  380.  
  381. alt-F7 -       Change all lines to next base (based on the base of the current
  382.                line); if current base is 36, change to base 2
  383.  
  384. shift-alt-F7 - Change all lines to previous base (based on the base of the
  385.                current line); if current base is 2, change to base 36
  386.  
  387. All these keys result in the string of digits in the appropriate window(s)
  388. changing to mirror the change in base (although the actual value of the number
  389. is, of course, the same).
  390.  
  391. For example, pressing F2 when 11 is displayed in base 10 will result in the
  392. display changing to 1011.
  393.  
  394. Had enough? Well, here's a couple more:
  395.  
  396. ctrl-F5 -      Alter current line to any base you choose (base 2-36)
  397.  
  398. alt-F5 -       Alter all lines to any one base you choose (base 2-36)
  399.  
  400. These two keys change the base without changing the string of digits
  401. displayed, i.e. actually change the value of the number. It is useful if you
  402. type a number and then notice you are in the wrong base. These keys will not
  403. allow you to change to a base in which either the current digits are not
  404. allowed or for which the number is too large.
  405.  
  406. For example, pressing ctrl-F5 and typing 2 when 11 is displayed in base 10,
  407. will leave the display intact (which means the number changed to 3 in base
  408. 10).
  409.  
  410. Remember the difference between changing a base and altering a base; it will
  411. come useful if you ever decide to start a career in nit picking.
  412.  
  413.  
  414.  
  415. LINE COPYING FUNCTION KEYS
  416. ==========================
  417.  
  418. It is often useful to be able to copy numbers from one window to another:
  419.  
  420. F3 -           Copy number from result to current line
  421.  
  422. shift-F3 -     Copy number from other operand line to current line
  423.  
  424. ctrl-F3 -      Copy number from result to current line then execute operation
  425.                again; this is very useful to repeat an opeartion many times,
  426.                each time replacing an operand (usually the first) with the
  427.                result
  428.  
  429.  
  430.  
  431. DISPLAY RELATED FUNCTION KEYS
  432. =============================
  433.  
  434. F4 -           Change the casing of letters in numbers appearing on the screen
  435.                to the next option in the sequence:
  436.  
  437.                   a) all digits uppercase (default)
  438.                   b) all digits lowercase
  439.                   c) first digit, if letter, uppercase, all others lowercase
  440.                      (proper noun capitalization)
  441.  
  442.                A truly useless option, bordering on the blatantly stupid
  443.  
  444. shift-F4 -     Turn on/off the display of number coordinates (the location of
  445.                the cursor within the INTEG & FRACT fields). A close match to
  446.                the previous option
  447.  
  448. ctrl-F4 -      Turn on/off the display of '+' for positive numbers. 'Nough
  449.                said
  450.  
  451.  
  452.  
  453. MISCELLANEOUS FUNCTION KEYS
  454. ===========================
  455.  
  456. F9 -           Clear the current line and return to INTEG
  457.  
  458. shift-F9 -     Clear all lines, as well as the operator, and return to INTEG
  459.                of line 1
  460.  
  461. shift-F6 -     Allows user to repeat any key any number of times (up to 99);
  462.                can be useful, for example, if you want to type the maximal
  463.                integer in base 2 (1111111111111111111111111111111) - you would
  464.                then type shift-F6, 31, 1 (all this in base 2, of course),
  465.                which is much simpler than counting 31 keystrokes; any key, not
  466.                just digits, can be thus repeated; trying to repeat alt-F10
  467.                74 times will probably not result in a very useful action
  468.  
  469. F1 -           Help; use PgDn and PgUp to scroll through its multitude of
  470.                screens; use Esc to exit
  471.  
  472. alt-F10 -      Quit the program; probably the single most (only?) useful key
  473.                in this program
  474.  
  475.  
  476.  
  477. KNOWN BUGS
  478. ==========
  479.  
  480. This program annoyingly prevents the user from dividing by zero. This is due
  481. to restrictions maliciously set on the author by a self-appointed committee of
  482. math professors. The author is currently negotiating with this body the
  483. revoking of this useless constraint. Users will be informed of any changes in
  484. the status of these negotiations as soon as Burke & Hare are back.
  485.  
  486.  
  487.  
  488. CHANGE HISTORY
  489. ==============
  490.  
  491. v. 1.10: - added bitwise and, or, xor & not operators
  492.          - changed key for Power to @
  493.          - added # key for Inversion
  494.  
  495. v. 1.00: - first public version
  496.  
  497.  
  498.  
  499. AGAIN, DON'T HESITATE TO CALL AND ASK FOR ANY IMPROVEMENT YOU MAY WISH
  500. ======================================================================
  501.  
  502. My e-mail:    mrkgnao@actcom.co.il
  503.  
  504. My address:   Raphael Slepon
  505.               P.O.Box 15521
  506.               Rishon Lezion 75054
  507.               Israel
  508.  
  509.  
  510.  
  511. AH, YES; WHAT'S THIS WIERD NAME FOR A PROGRAM ALL ABOUT ANYHOW?
  512. ===============================================================
  513.  
  514. Unexpected End Of File
  515.  
  516.